package com.project.entity;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the PropForRent database table.
 * 
 */
@Entity
@Table(name="PropForRent")
@NamedQueries({
	@NamedQuery(name = "PropForRent.findAllPropForRent", query = "select pro from PropForRent pro"),
	@NamedQuery(name="PropForRent.searchAdvance",query="select pro from PropForRent pro where (pro.deposit between :depositMin and :depositMax) and (pro.rent between :rentMin and :rentMax) and (pro.bedRoom between :bedRoomMin and :bedRoomMax and pro.bedRoom<:bedRoomMax) and (pro.bathRoom between :bathRoomMin and :bathRoomMax and pro.bathRoom<:bathRoomMax)"),
	@NamedQuery(name="PropForRent.searchSimple",query="select pro from PropForRent pro where (:title is null or pro.property.title like :title) and (:address is null or pro.property.address like :address)")
})
public class PropForRent implements Serializable {
	private static final long serialVersionUID = 1L;
	
	@Id
	@Column(name="PropID")
	private String propID;

	@Column(name="BathRoom")
	private int bathRoom;

	@Column(name="BedRoom")
	private int bedRoom;

	@Column(name="Deposit")
	private double deposit;

	@Column(name="Payment")
	private String payment;

	@Column(name="Rent")
	private double rent;

	//bi-directional one-to-one association to Property
	@OneToOne
	@JoinColumn(name="PropID")
	private Property property;
	
	
	
	
    public PropForRent() {
    	
		
    }

	public String getPropID() {
		return this.propID;
	}

	public void setPropID(String propID) {
		this.propID = propID;
	}

	public int getBathRoom() {
		return this.bathRoom;
	}

	public void setBathRoom(int bathRoom) {
		this.bathRoom = bathRoom;
	}

	public int getBedRoom() {
		return this.bedRoom;
	}

	public void setBedRoom(int bedRoom) {
		this.bedRoom = bedRoom;
	}

	public double getDeposit() {
		return this.deposit;
	}

	public void setDeposit(double deposit) {
		this.deposit = deposit;
	}

	public String getPayment() {
		return this.payment;
	}

	public void setPayment(String payment) {
		this.payment = payment;
	}

	public double getRent() {
		return this.rent;
	}

	public void setRent(double rent) {
		this.rent = rent;
	}

	public Property getProperty() {
		return this.property;
	}

	public void setProperty(Property property) {
		this.property = property;
	}



	
	
}